//商店购物流程
import React from "react";
import "./css/store-shopping-process.css";
import "./css/storeShowSet.css";
import "./css/StoreInfo.css";
import { Form, Input, Button, Radio } from "antd";
import HOCStoreShoppingProcess from '../../component/set/HOC/HOCStoreShoppingProcess'

const layout = {
  labelCol: { span: 6 },
  wrapperCol: { span: 10 },
};

@HOCStoreShoppingProcess
class StoreShoppingProcess extends React.Component {
  render() {
      let {submit} = this.props
    return (
      <div className="store_shopping_process store_show_set storeInfo">
        <div className="singleForms">
          <Form {...layout} name="infoOne" ref='formOne'>
            <div className="formTwo">
              <Form.Item
                label="是否使用积分"
                name="integralStatu"
                rules={[{ required: true, message: "请选择" }]}
              >
                <Radio.Group>
                  <Radio value={1}>使用</Radio>
                  <Radio value={0}>不使用</Radio>
                </Radio.Group>
              </Form.Item>
            </div>
            <div className="formTwo">
              <Form.Item
                label="是否使用优惠券"
                name="coupon"
                rules={[{ required: true, message: "请选择" }]}
              >
                <Radio.Group>
                  <Radio value={1}>使用</Radio>
                  <Radio value={0}>不使用</Radio>
                </Radio.Group>
              </Form.Item>
            </div>
            <div className="formTwo">
              <Form.Item
                label="是否使用余额"
                name="balance"
                rules={[{ required: true, message: "请选择" }]}
              >
                <Radio.Group>
                  <Radio value={1}>使用</Radio>
                  <Radio value={0}>不使用</Radio>
                </Radio.Group>
              </Form.Item>
            </div>
            <div className="formTwo">
              <Form.Item
                label="备注"
                name="orderStatu"
                rules={[{ required: true, message: "请选择" }]}
              >
                <Radio.Group>
                  <Radio value={1}>必须填写备注</Radio>
                  <Radio value={0}>无需填写备注</Radio>
                </Radio.Group>
              </Form.Item>
            </div>

            <Form.Item
              label="购物最小金额"
              name="amountMin"
              rules={[{ required: true, message: "请填写购物最小金额" }]}
            >
              <Input
                className="info-border"
                placeholder="达到此购物金额，才能提交订单"
              ></Input>
            </Form.Item>
            <div className="formTwo">
              <Form.Item
                label="减少库存时机"
                name="reduceStatu"
                rules={[{ required: true, message: "请选择" }]}
              >
                <Radio.Group>
                  <Radio value={0}>付款时</Radio>
                  <Radio value={1}>成团时</Radio>
                </Radio.Group>
              </Form.Item>
            </div>
          </Form>
          <div className="btn">
            <Button onClick={submit}>确定</Button>
          </div>
        </div>
      </div>
    );
  }
}

export default StoreShoppingProcess;
